<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVipTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('vip', function (Blueprint $table) {
            $table->increments('id');
            $table->string('phone')->nullable()->comment('账号昵称');
            $table->string('uuid')->nullable()->comment('会员id');
            $table->timestamp('reg_time')->nullable()->comment('会员创建时间');
            $table->string('from_type')->nullable()->comment('会员来源');
            $table->string('integral')->nullable()->comment('账号总积分');
            $table->timestamps();
            $table->softDeletes();
        });

        Schema::create('vip_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('vip_id')->default(0);
            $table->string('nickname')->nullable()->comment('账号昵称');
            $table->string('realname')->nullable()->comment('真实姓名');
            $table->smallInteger('sex')->default(0)->comment('性别');
            $table->timestamp('reg_time')->nullable()->comment('会员创建时间');
            $table->string('province')->nullable()->comment('省');
            $table->string('city')->nullable()->comment('市');
            $table->string('area')->nullable()->comment('地区');
            $table->string('detail')->nullable()->comment('详情');
            $table->string('integral')->nullable()->comment('用户积分');
            $table->string('phone')->nullable()->comment('用户手机号');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
